package com.example.administrator.easy.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/11/14.
 */

public class GuangRqVpAdapter extends FragmentPagerAdapter {//
    private ArrayList<String> mTitleList;
    private ArrayList<Fragment> mFmList;

    public GuangRqVpAdapter(FragmentManager fm,ArrayList<String> titleList,ArrayList<Fragment> fmList) {
        super(fm);
        mTitleList = titleList;
        mFmList = fmList;
    }

    @Override
    public Fragment getItem(int position) {
        return mFmList.get(position);
    }

    @Override
    public int getCount() {
        return mFmList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitleList.get(position);
    }
}
